<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="${ctxStatic}/race/css/login.css">
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <style>
        .login-bg {
            padding: 0;
            margin: 0;
            position: relative;
        }

        .login-bg-bimg {
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
        }

        .login-bg-logo {
            width: 20%;
            position: absolute;
            top: 0;
            left: 20%;
            margin-top: 17%;
        }

        .login-container {
            width: 40%;
            position: absolute;
            left: 60%;
            margin-top: 10%;
        }

        .login-c-title {
            color: #fff;
            letter-spacing: 5px
        }

        .login-c-line {
            width: 100%;
            margin-left: -15%
        }

        .login-c-input {
            margin-top: 15px
        }

        .login-c-input input {
            position: absolute;
            left: 12%;
            height: 45px;
            background-color: transparent;
            border: 0;
            width: 200px;
        }

        .login-c-btn {
            position: relative;
            margin-top: 15px;
        }

        .login-c-btn img {
            opacity: 0.5;
            background-color: rgba(20, 46, 140, 0.2);
            margin-left: 20%;
        }

        .login-c-btn span {
            position: absolute;
            color: #fff;
            letter-spacing: 20px;
            left: 26%;
            top: 25%;
        }

        .login-c-img {
            margin-top: 15px;
        }

        .login-c-img img {
            width: 70%;
        }

        .ec_tip {
            display: none;
            padding: 20px;
            position: absolute;
            background: #FFFFFF;
            color: #4F4F4F;
            border: 10px solid #46A3FF;
            z-index: 9999;
        }

    </style>
</head>
<body class="login-bg">
<img src="${ctxStatic}/race/image/登录背景.jpg" class="login-bg-bimg">

<c:if test="${raceSchedule.scheduleLogo!=null&&raceSchedule.scheduleLogo!=''}">
    <img src="${raceSchedule.scheduleLogo}" class="login-bg-logo">
</c:if>

<%--显示赛程Logo--%>
<c:choose>
    <c:when test="${raceSchedule.scheduleLogo!=null&&raceSchedule.scheduleLogo!=''}">
        <img src="${raceSchedule.scheduleLogo}" class="login-bg-logo">
    </c:when>
    <c:otherwise>
        <img src="${ctxStatic}/race/image/logggg.gif" class="login-bg-logo">
    </c:otherwise>
</c:choose>


<div class="login-container">
    <div class="login-c-title">
        <c:if test="${mun == '0'}"><label style="font-weight:bold;font-size: 25px;">赛程暂未开启</label></c:if>
        <c:if test="${mun == '1'}"><label
                style="font-weight:bold;font-size: 25px;">${raceSchedule.scheduleName}</label></c:if>
    </div>
    <img class="login-c-line1" src="${ctxStatic}/race/image/division.png">

    <form id="inputForm" action="${ctxf}/race/raceLogin/login" method="post" class="form-horizontal">
        <input type="hidden" name="repertoryId" value="${raceSchedule.repertoryId}">
        <input type="hidden" name="judge" value="${raceSchedule.scheduleStatus}">
        <input type="hidden" name="scheduleId" value="${raceSchedule.id}">
        <div class="login-c-input">
            <img src="${ctxStatic}/race/image/name_input.png">
            <input name="user" type="text">
        </div>
        <div class="login-c-input">
            <img src="${ctxStatic}/race/image/name_input.png">
            <input name="paw" type="password">
        </div>
        <img class="login-c-line" src="${ctxStatic}/race/image/division.png">

        <div class="login-c-btn">
            <img src="${ctxStatic}/race/image/login-btn.gif">
        <span>
              <input type="submit" value="登陆"
                     style="font-size: 20px ; margin-left: -20px; border: none;background:none;cursor:pointer;"/>
        </span>
        </div>
        <div class="login-c-img">

            <c:if test="${raceSchedule.scheduleNotice!=null&&raceSchedule.scheduleNotice!=''}">
                <textarea
                        style="max-height:300px;height: 150px;width: 400px;background-color:lightblue; border:solid 2px #ffffff; border-radius:20px; resize:none;"
                        readonly="readonly"> ${raceSchedule.scheduleNotice}
                </textarea>
            </c:if>

        </div>
    </form>
</div>
<script>
    console.info("1111");
    var ms = ${message};
    console.info("222" + ms);

    if (ms == true) {
        window.Alert = function (messages, callback) {
            if ($(".ec_tip").length < 1) {
                $("body").append("<div class=\"ec_tip\">" + messages + "</div>");
            }
            //定位居中显示
            leftW = (document.body.clientWidth - $(".ec_tip").width()) / 2;
            topH = (document.body.clientHeight - $(".ec_tip").height()) / 3;
            $(".ec_tip").css("top", topH + "px").css("left", leftW + "px").fadeIn(2000);
            //谈出效果并执行回调
            $(".ec_tip").animate({top: "0px", opacity: 0}, 2000, function () {
                $(".ec_tip").remove();
            });
        }
        Alert("账号或者密码有误，请重新输入");
        ms = false;
    }

</script>
</body>
</html>